package com.hgkj.cloud.base.service.impl;

import com.hgkj.cloud.base.common.PageInfo;
import com.hgkj.cloud.base.dao.TenantOrderInfoMapper;
import com.hgkj.cloud.base.domain.TenantOrderInfo;
import com.hgkj.cloud.base.service.TenantOrderInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class TenantOrderInfoServiceImpl implements TenantOrderInfoService {

    @Autowired
    private TenantOrderInfoMapper tenantOrderInfoMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return tenantOrderInfoMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(TenantOrderInfo record) {
        return tenantOrderInfoMapper.insert(record);
    }

    @Override
    public int insertSelective(TenantOrderInfo record) {
        return tenantOrderInfoMapper.insertSelective(record);
    }

    @Override
    public TenantOrderInfo selectByPrimaryKey(Long id) {
        return tenantOrderInfoMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(TenantOrderInfo record) {
        return tenantOrderInfoMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(TenantOrderInfo record) {
        return tenantOrderInfoMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<TenantOrderInfo> listAllOrderInfos(PageInfo pi, Map<String, Object> map) {
        if (pi != null) {
            map.put("currentCount", pi.getCurrentCount());
            map.put("pageSize", pi.getPageSize());
        }
        return tenantOrderInfoMapper.listAllOrderInfos(map);
    }

    @Override
    public List<Map> listAllOrderInfosNoTu(PageInfo pi, Map<String, Object> map) {
        if (pi != null) {
            map.put("currentCount", pi.getCurrentCount());
            map.put("pageSize", pi.getPageSize());
        }
        return tenantOrderInfoMapper.listAllOrderInfosNoTu(map);
    }

    @Override
    public long listAllOrderInfosCount(Map<String, Object> map) {
        return tenantOrderInfoMapper.listAllOrderInfosCount(map);
    }

    @Override
    public List<TenantOrderInfo> listOrderInfo(Map<String, Object> map) {
        return tenantOrderInfoMapper.listOrderInfo(map);
    }

    @Override
    public int insertOrderInfo(TenantOrderInfo record) {
        return tenantOrderInfoMapper.insertOrderInfo(record);
    }

    @Override
    public Map<String, Long> getUserOrderCount(Map<String, Object> map) {
        return tenantOrderInfoMapper.getUserOrderCount(map);
    }

    @Override
    public long findOrderCount(String admin_uuid) {
        return tenantOrderInfoMapper.findOrderCount(admin_uuid);
    }   @Override
    public long findOrderCountByUserUuid(String user_uuid) {
        return tenantOrderInfoMapper.findOrderCountByUserUuid(user_uuid);
    }

    @Override
    public List<Map<String, Object>> getAllPsyEmail(Map<String, Object> map) {
        return tenantOrderInfoMapper.getAllPsyEmail(map);
    }
}
